/*
 * @Author: lizhijie429
 * @Date: 2021-08-21 15:59:21
 * @LastEditors: lizhijie429
 * @LastEditTime: 2021-08-21 16:06:36
 * @Description:
 */
export const getRequest = async url => {
  try {
    const response = await fetch(url, {
      method: "get",
      headers: new Headers({
        "Content-Type": "application/json",
      }),
    });
    console.log("response", response);
    const data = await response.json();
    return data;
  } catch (error) {
    console.log("请求出错", error);
  }
};
